#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import struct
import json

# obj = struct.pack("i", 12)
# print(obj, len(obj))
#
# o2 = struct.unpack("i", obj)
# print(o2)
# print(o2[0])

header = {'file_size': 1073741824000, 'file_name': '/a/b/c/d/e/a.txt',
          'md5': '8f6fbf8347faa4924a76856701edb0f3'}  # 1T数据,文件路径和md5值

json_header = json.dumps(header)
# print(json_header, type(json_header))
x = struct.pack("i", len(json_header))
print(x, len(x))




